import http from '../../request/api';

const state = {
    orderList: []
}

const getters = {

}

const mutations = {
    setOrderList(state, v) {
        console.log('setOrderList', v);
        state.orderList = v
    },
}
const actions = {
    getOrderList: async ({ commit }) => {
        return new Promise(async r => {
            let res = await http.getOrderList({ page: 1, pageSize: 9999 });
            commit('setOrderList', res.data);
            r(res);
        })
    }
}

export default {
    state,
    getters,
    actions,
    mutations
}